<a href="?option=com_targets&controller=target&view=target&id=<?php echo $this->target_id; ?>&prefix=<?php echo $this->prefix; ?>"><?php echo $this->prefix . ' ' . $this->target_name; ?></a>

<form style="margin-bottom:20px" method="POST" action="index.php">
<input type="hidden" name="option" value="com_targets" />
<input type="hidden" name="controller" value="target" />
<input type="hidden" name="task" value="save_comment" />
<input type="hidden" name="id" value="<?php echo $this->target_id;?>" />
<input type="hidden" name="prefix" value="<?php echo $this->prefix;?>" />
Оставить комментарий:<br>
<textarea name="text" style="width:400px;height:100px"></textarea><br>
<input type="submit" value="Отправить">
</form>

<?php 
	if (count($this->comments) == 0) {
		print '<div>Комментариев нет</div>';
	}
?>

<?php
if (count($this->comments) != 0) { ?>
	<div><?php echo $this->comments[0]->comment?></div>
<?php 
}
?>

<?php
for ($i = 1, $n = count($this->comments); $i < $n; $i++) {
	?>
	<hr>
	<div><?php echo $this->comments[$i]->comment?></div>
	<?php
}
?>
<div style="margin-bottom:20px"><?php  for ($i = 0, $n = count($this->pages); $i < $n; $i++) { 
	if ($this->pages[$i] == $this->current_page) {
		echo "[{$this->pages[$i]}]";
	}
	else {
	?>
	<a href="index.php?option=com_targets&view=comments&target_id=<?php echo $this->target_id; ?>&page=<?php echo $this->pages[$i];?>"><?php echo $this->pages[$i]; ?></a>
<?php 
	}
}
?>
</div>